package com.dhcc.DRGsHosp.core.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.openkoala.koala.commons.domain.KoalaLegacyEntity;

/**
 * 
 * @title		:ManageSummaryDtl.java
 * @description	:
 * @author		:mazhaoyan
 * @date		:2017年6月12日
 * @version     :1.0
 * @copyright   :DHCC 2013-2014
 */
@Entity
@Table(name = "T_MANAGESUMMARYDTL", schema = "DRGs")
public class ManageSummaryDtl extends KoalaLegacyEntity {

	private static final long serialVersionUID = -4173966668353355799L;

	// 标杆汇总详情ID
	@Id
	@Column(name = "MSDTL_ID", nullable = false)
	private String msDtlId;

	// 管理目标代码
	@Column(name = "PAR_MS_CODE", nullable = false)
	private String parMsCode;

	// 指标代码
	@Column(name = "PARQUOTA_CODE")
	private String parquotaCode;

	// 标杆值
	@Column(name = "MANAGE_BENCHMARK")
	private Double manageBenchmark;
	
	// drg代码
	@Column(name = "PARDRG_CODE")
	private String pardrgCode;
	
	// 标杆年份
	@Column(name = "STD_YEAR")
	private String stdYear;
	
	// 病人类型
	@Column(name = "PATIENT_TYPE")
	private String patientType;

	public ManageSummaryDtl() {
		super();
	}

	/**
     *  
     * @param msDtlId
     * @param parMsCode
     * @param parquotaCode
     * @param manageBenchmark
     * @param pardrgCode
     * @param stdYear
     * @param patientType
	 */
	public ManageSummaryDtl(String msDtlId, String parMsCode, String parquotaCode, Double manageBenchmark,
			String pardrgCode, String stdYear, String patientType) {
		super();
		this.msDtlId = msDtlId;
		this.parMsCode = parMsCode;
		this.parquotaCode = parquotaCode;
		this.manageBenchmark = manageBenchmark;
		this.pardrgCode = pardrgCode;
		this.stdYear = stdYear;
		this.patientType = patientType;
	}


	public ManageSummaryDtl(String msDtlId, String parMsCode, String parquotaCode, String pardrgCode, String stdYear,
			String patientType) {
		super();
		this.msDtlId = msDtlId;
		this.parMsCode = parMsCode;
		this.parquotaCode = parquotaCode;
		this.pardrgCode = pardrgCode;
		this.stdYear = stdYear;
		this.patientType = patientType;
	}

	public String getMsDtlId() {
		return msDtlId;
	}

	public void setMsDtlId(String msDtlId) {
		this.msDtlId = msDtlId;
	}

	public String getParMsCode() {
		return parMsCode;
	}

	public void setParMsCode(String parMsCode) {
		this.parMsCode = parMsCode;
	}

	public String getParquotaCode() {
		return parquotaCode;
	}

	public void setParquotaCode(String parquotaCode) {
		this.parquotaCode = parquotaCode;
	}

	public Double getManageBenchmark() {
		return manageBenchmark;
	}

	public void setManageBenchmark(Double manageBenchmark) {
		this.manageBenchmark = manageBenchmark;
	}

	public String getPardrgCode() {
		return pardrgCode;
	}

	public void setPardrgCode(String pardrgCode) {
		this.pardrgCode = pardrgCode;
	}

	public String getStdYear() {
		return stdYear;
	}

	public void setStdYear(String stdYear) {
		this.stdYear = stdYear;
	}

	public String getPatientType() {
		return patientType;
	}

	public void setPatientType(String patientType) {
		this.patientType = patientType;
	}

	@Override
	public String[] businessKeys() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Serializable getId() {
		// TODO Auto-generated method stub
		return this.msDtlId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1 ;
		result = prime * result + ((parMsCode == null) ? 0 : parMsCode.hashCode());
		result = prime * result + ((pardrgCode == null) ? 0 : pardrgCode.hashCode());
		result = prime * result + ((parquotaCode == null) ? 0 : parquotaCode.hashCode());
		result = prime * result + ((patientType == null) ? 0 : patientType.hashCode());
		result = prime * result + ((stdYear == null) ? 0 : stdYear.hashCode());
		return result ;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (getClass() != obj.getClass())
			return false;
		ManageSummaryDtl other = (ManageSummaryDtl) obj;
		if (parMsCode == null) {
			if (other.parMsCode != null)
				return false;
		} else if (!parMsCode.equals(other.parMsCode))
			return false;
		if (pardrgCode == null) {
			if (other.pardrgCode != null)
				return false;
		} else if (!pardrgCode.equals(other.pardrgCode))
			return false;
		if (parquotaCode == null) {
			if (other.parquotaCode != null)
				return false;
		} else if (!parquotaCode.equals(other.parquotaCode))
			return false;
		if (patientType == null) {
			if (other.patientType != null)
				return false;
		} else if (!patientType.equals(other.patientType))
			return false;
		if (stdYear == null) {
			if (other.stdYear != null)
				return false;
		} else if (!stdYear.equals(other.stdYear))
			return false;
		return true;
	}
}
